home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl70b2.lha / tcl7.0b2 / configure < prev    next >
Text File  |  1993-07-19  |  18KB  |  726 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf.
  4. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
  21. #        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
  22. # Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
  23. # --with-PACKAGE unless this script has special code to handle it.
  24.  
  25.  
  26. for arg
  27. do
  28.   # Handle --exec-prefix with a space before the argument.
  29.   if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  30.   # Handle --host with a space before the argument.
  31.   elif test x$next_host = xyes; then next_host=
  32.   # Handle --prefix with a space before the argument.
  33.   elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  34.   # Handle --srcdir with a space before the argument.
  35.   elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  36.   else
  37.     case $arg in
  38.      # For backward compatibility, also recognize exact --exec_prefix.
  39.      -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  40.     exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  41.      -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  42.     next_exec_prefix=yes ;;
  43.  
  44.      -gas | --gas | --ga | --g) ;;
  45.  
  46.      -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  47.      -host | --host | --hos | --ho | --h)
  48.     next_host=yes ;;
  49.  
  50.      -nfp | --nfp | --nf) ;;
  51.  
  52.      -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
  53.         no_create=1 ;;
  54.  
  55.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  56.     prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  57.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  58.     next_prefix=yes ;;
  59.  
  60.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  61.     srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  62.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  63.     next_srcdir=yes ;;
  64.  
  65.      -with-* | --with-*)
  66.        package=`echo $arg|sed 's/-*with-//'`
  67.        # Delete all the valid chars; see if any are left.
  68.        if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
  69.          echo "configure: $package: invalid package name" >&2; exit 1
  70.        fi
  71.        eval "with_`echo $package|sed s/-/_/g`=1" ;;
  72.  
  73.      *) ;;
  74.     esac
  75.   fi
  76. done
  77.  
  78. trap 'rm -f conftest* core; exit 1' 1 3 15
  79.  
  80. rm -f conftest*
  81. compile='${CC-cc} $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  82.  
  83. # A filename unique to this package, relative to the directory that
  84. # configure is in, which we can look for to find out if srcdir is correct.
  85. unique_file=tcl.h
  86.  
  87. # Find the source files, if location was not specified.
  88. if test -z "$srcdir"; then
  89.   srcdirdefaulted=yes
  90.   # Try the directory containing this script, then `..'.
  91.   prog=$0
  92.   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  93.   test "X$confdir" = "X$prog" && confdir=.
  94.   srcdir=$confdir
  95.   if test ! -r $srcdir/$unique_file; then
  96.     srcdir=..
  97.   fi
  98. fi
  99. if test ! -r $srcdir/$unique_file; then
  100.   if test x$srcdirdefaulted = xyes; then
  101.     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  102.   else
  103.     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  104.   fi
  105.   exit 1
  106. fi
  107. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  108. # But we can't avoid them for `..', to make subdirectories work.
  109. case $srcdir in
  110.   .|/*|~*) ;;
  111.   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  112. esac
  113.  
  114. # Make sure to not get the incompatible SysV /etc/install and
  115. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  116. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  117. # or the AFS install, which mishandles nonexistent args.  (Sigh.)
  118. if test -z "$INSTALL"; then
  119.   echo checking for install
  120.   saveifs="$IFS"; IFS="${IFS}:"
  121.   for dir in $PATH; do
  122.     test -z "$dir" && dir=.
  123.     case $dir in
  124.     /etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;;
  125.     *)
  126.       if test -f $dir/install; then
  127.     if grep dspmsg $dir/install >/dev/null 2>&1; then
  128.       : # AIX
  129.     else
  130.       INSTALL="$dir/install -c"
  131.       INSTALL_PROGRAM='$(INSTALL)'
  132.       INSTALL_DATA='$(INSTALL) -m 644'
  133.       break
  134.     fi
  135.       fi
  136.       ;;
  137.     esac
  138.   done
  139.   IFS="$saveifs"
  140. fi
  141. INSTALL=${INSTALL-cp}
  142. INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  143. INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  144.  
  145. if test -z "$RANLIB"; then
  146.   echo checking for ranlib
  147.   saveifs="$IFS"; IFS="${IFS}:"
  148.   for dir in $PATH; do
  149.     test -z "$dir" && dir=.
  150.     if test -f $dir/ranlib; then
  151.       RANLIB="ranlib"
  152.       break
  153.     fi
  154.   done
  155.   IFS="$saveifs"
  156. fi
  157. test -z "$RANLIB" && RANLIB="@:"
  158.  
  159.  
  160. #--------------------------------------------------------------------
  161. #    Supply substitutes for missing POSIX library procedures, or
  162. #    set flags so Tcl uses alternate procedures.
  163. #--------------------------------------------------------------------
  164.  
  165. for func in getcwd opendir strerror strstr strtod
  166. do
  167. echo checking for ${func}
  168. cat > conftest.c <<EOF
  169.  
  170. main() { exit(0); } 
  171. t() { 
  172. /* Override any gcc2 internal prototype to avoid an error.  */
  173. extern char ${func}(); ${func}(); }
  174. EOF
  175. if eval $compile; then
  176.   :
  177. else
  178.   LIBOBJS="$LIBOBJS ${func}.o"
  179. fi
  180. rm -f conftest*
  181.  
  182. done
  183.  
  184. for func in strtol strtoul tmpnam waitpid
  185. do
  186. echo checking for ${func}
  187. cat > conftest.c <<EOF
  188.  
  189. main() { exit(0); } 
  190. t() { 
  191. /* Override any gcc2 internal prototype to avoid an error.  */
  192. extern char ${func}(); ${func}(); }
  193. EOF
  194. if eval $compile; then
  195.   :
  196. else
  197.   LIBOBJS="$LIBOBJS ${func}.o"
  198. fi
  199. rm -f conftest*
  200.  
  201. done
  202.  
  203. echo checking for gettimeofday
  204. cat > conftest.c <<EOF
  205. #include <stdio.h>
  206. main() { exit(0); } 
  207. t() { 
  208. #ifdef __stub_gettimeofday
  209. choke me
  210. #else
  211. /* Override any gcc2 internal prototype to avoid an error.  */
  212. extern char gettimeofday(); gettimeofday();
  213. #endif
  214.  }
  215. EOF
  216. if eval $compile; then
  217.   :
  218. else
  219.   DEFS="$DEFS -DNO_GETTOD=1"
  220. fi
  221. rm -f conftest*
  222. #endif
  223.  
  224. echo checking for getwd
  225. cat > conftest.c <<EOF
  226. #include <stdio.h>
  227. main() { exit(0); } 
  228. t() { 
  229. #ifdef __stub_getwd
  230. choke me
  231. #else
  232. /* Override any gcc2 internal prototype to avoid an error.  */
  233. extern char getwd(); getwd();
  234. #endif
  235.  }
  236. EOF
  237. if eval $compile; then
  238.   :
  239. else
  240.   DEFS="$DEFS -DNO_GETWD=1"
  241. fi
  242. rm -f conftest*
  243. #endif
  244.  
  245. echo checking for wait3
  246. cat > conftest.c <<EOF
  247. #include <stdio.h>
  248. main() { exit(0); } 
  249. t() { 
  250. #ifdef __stub_wait3
  251. choke me
  252. #else
  253. /* Override any gcc2 internal prototype to avoid an error.  */
  254. extern char wait3(); wait3();
  255. #endif
  256.  }
  257. EOF
  258. if eval $compile; then
  259.   :
  260. else
  261.   DEFS="$DEFS -DNO_WAIT3=1"
  262. fi
  263. rm -f conftest*
  264. #endif
  265.  
  266.  
  267. #--------------------------------------------------------------------
  268. #    Supply substitutes for missing POSIX header files.  Special
  269. #    notes:
  270. #        - Sprite's dirent.h exists but is bogus.
  271. #        - stdlib.h doesn't define strtol, strtoul, or
  272. #          strtod insome versions of SunOS
  273. #        - some versions of string.h don't declare procedures such
  274. #          as strstr
  275. #--------------------------------------------------------------------
  276.  
  277. echo checking for unistd.h
  278. echo checking how to run the C preprocessor
  279. if test -z "$CPP"; then
  280.   CPP='${CC-cc} -E'
  281.   cat > conftest.c <<EOF
  282. #include <stdio.h>
  283. EOF
  284. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  285. if test -z "$err"; then
  286.   :
  287. else
  288.   CPP=/lib/cpp
  289. fi
  290. rm -f conftest*
  291. fi
  292.  
  293. cat > conftest.c <<EOF
  294. #include <unistd.h>
  295. EOF
  296. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  297. if test -z "$err"; then
  298.   DEFS="$DEFS -DHAVE_UNISTD_H=1"
  299. fi
  300. rm -f conftest*
  301.  
  302. echo checking for dirent.h
  303. cat > conftest.c <<EOF
  304. #include <sys/types.h>
  305. #include <dirent.h>
  306. main() { exit(0); } 
  307. t() { 
  308. DIR *d;
  309. struct dirent *entryPtr;
  310. char *p;
  311. d = opendir("foobar");
  312. entryPtr = readdir(d);
  313. p = entryPtr->d_name;
  314. closedir(d);
  315.  }
  316. EOF
  317. if eval $compile; then
  318.   tcl_ok=1
  319. else
  320.   tcl_ok=0
  321. fi
  322. rm -f conftest*
  323.  
  324. echo '#include <tcl_ok=0>' > conftest.c
  325. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  326. if egrep "Sprite version.* NOT POSIX" conftest.out >/dev/null 2>&1; then
  327.   :
  328. fi
  329. rm -f conftest*
  330.  
  331. if test $tcl_ok = 0; then DEFS="$DEFS -DNO_DIRENT_H=1"; fi
  332. echo checking for float.h
  333. cat > conftest.c <<EOF
  334. #include <float.h>
  335. EOF
  336. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  337. if test -z "$err"; then
  338.   :
  339. else
  340.   DEFS="$DEFS -DNO_FLOAT_H=1"
  341. fi
  342. rm -f conftest*
  343.  
  344. echo checking for limits.h
  345. cat > conftest.c <<EOF
  346. #include <limits.h>
  347. EOF
  348. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  349. if test -z "$err"; then
  350.   :
  351. else
  352.   DEFS="$DEFS -DNO_LIMITS_H=1"
  353. fi
  354. rm -f conftest*
  355.  
  356. echo checking for stdlib.h
  357. cat > conftest.c <<EOF
  358. #include <stdlib.h>
  359. EOF
  360. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  361. if test -z "$err"; then
  362.   tcl_ok=1
  363. else
  364.   tcl_ok=0
  365. fi
  366. rm -f conftest*
  367.  
  368. echo '#include <stdlib.h>' > conftest.c
  369. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  370. if egrep "strtol" conftest.out >/dev/null 2>&1; then
  371.   :
  372. else 
  373.   tcl_ok=0
  374. fi
  375. rm -f conftest*
  376.  
  377. echo '#include <stdlib.h>' > conftest.c
  378. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  379. if egrep "strtoul" conftest.out >/dev/null 2>&1; then
  380.   :
  381. else 
  382.   tcl_ok=0
  383. fi
  384. rm -f conftest*
  385.  
  386. echo '#include <stdlib.h>' > conftest.c
  387. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  388. if egrep "strtod" conftest.out >/dev/null 2>&1; then
  389.   :
  390. else 
  391.   tcl_ok=0
  392. fi
  393. rm -f conftest*
  394.  
  395. if test $tcl_ok = 0; then DEFS="$DEFS -DNO_STDLIB_H=1"; fi
  396. echo checking for string.h
  397. cat > conftest.c <<EOF
  398. #include <string.h>
  399. EOF
  400. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  401. if test -z "$err"; then
  402.   tcl_ok=1
  403. else
  404.   tcl_ok=0
  405. fi
  406. rm -f conftest*
  407.  
  408. echo '#include <string.h>' > conftest.c
  409. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  410. if egrep "strstr" conftest.out >/dev/null 2>&1; then
  411.   :
  412. else 
  413.   tcl_ok=0
  414. fi
  415. rm -f conftest*
  416.  
  417. echo '#include <string.h>' > conftest.c
  418. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  419. if egrep "strerror" conftest.out >/dev/null 2>&1; then
  420.   :
  421. else 
  422.   tcl_ok=0
  423. fi
  424. rm -f conftest*
  425.  
  426. if test $tcl_ok = 0; then DEFS="$DEFS -DNO_STRING_H=1"; fi
  427. echo checking for sys/time.h
  428. cat > conftest.c <<EOF
  429. #include <sys/time.h>
  430. EOF
  431. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  432. if test -z "$err"; then
  433.   :
  434. else
  435.   DEFS="$DEFS -DNO_SYS_TIME_H=1"
  436. fi
  437. rm -f conftest*
  438.  
  439. echo checking for sys/wait.h
  440. cat > conftest.c <<EOF
  441. #include <sys/wait.h>
  442. EOF
  443. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  444. if test -z "$err"; then
  445.   :
  446. else
  447.   DEFS="$DEFS -DNO_SYS_WAIT_H=1"
  448. fi
  449. rm -f conftest*
  450.  
  451.  
  452. #--------------------------------------------------------------------
  453. #    On some systems strstr is broken: it returns a pointer even
  454. #    even if the original string is empty.
  455. #--------------------------------------------------------------------
  456.  
  457. cat > conftest.c <<EOF
  458.  
  459. extern int strstr();
  460. int main()
  461. {
  462.     exit(strstr("\0test", "test") ? 1 : 0);
  463. }
  464.  
  465. EOF
  466. eval $compile
  467. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  468.   :
  469. else
  470.   LIBOBJS="$LIBOBJS strstr.o"
  471. fi
  472. rm -f conftest*
  473.  
  474. #--------------------------------------------------------------------
  475. #    Under some versions of AIX strtoul returns an incorrect terminator
  476. #    pointer for the string "0".
  477. #--------------------------------------------------------------------
  478.  
  479. cat > conftest.c <<EOF
  480.  
  481. extern int strtoul();
  482. int main()
  483. {
  484.     char *string = "0";
  485.     char *term;
  486.     int value;
  487.     value = strtoul(string, &term, 0);
  488.     if ((value != 0) || (term != (string+1))) {
  489.         exit(1);
  490.     }
  491.     exit(0);
  492. }
  493. EOF
  494. eval $compile
  495. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  496.   :
  497. else
  498.   LIBOBJS="$LIBOBJS strtoul.o"
  499. fi
  500. rm -f conftest*
  501.  
  502. #--------------------------------------------------------------------
  503. #    Check for various typedefs and provide substitutes if
  504. #    they don't exist.
  505. #--------------------------------------------------------------------
  506.  
  507. echo checking for mode_t in sys/types.h
  508. echo '#include <sys/types.h>' > conftest.c
  509. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  510. if egrep "mode_t" conftest.out >/dev/null 2>&1; then
  511.   :
  512. else 
  513.   DEFS="$DEFS -Dmode_t=int"
  514. fi
  515. rm -f conftest*
  516.  
  517. echo checking for pid_t in sys/types.h
  518. echo '#include <sys/types.h>' > conftest.c
  519. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  520. if egrep "pid_t" conftest.out >/dev/null 2>&1; then
  521.   :
  522. else 
  523.   DEFS="$DEFS -Dpid_t=int"
  524. fi
  525. rm -f conftest*
  526.  
  527. echo checking for size_t in sys/types.h
  528. echo '#include <sys/types.h>' > conftest.c
  529. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  530. if egrep "size_t" conftest.out >/dev/null 2>&1; then
  531.   :
  532. else 
  533.   DEFS="$DEFS -Dsize_t=unsigned"
  534. fi
  535. rm -f conftest*
  536.  
  537. echo checking for uid_t in sys/types.h
  538. echo '#include <sys/types.h>' > conftest.c
  539. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  540. if egrep "uid_t" conftest.out >/dev/null 2>&1; then
  541.   :
  542. else 
  543.   DEFS="$DEFS -Duid_t=int" DEFS="$DEFS -Dgid_t=int"
  544. fi
  545. rm -f conftest*
  546.  
  547.  
  548. #--------------------------------------------------------------------
  549. #    If a system doesn't have an opendir function (man, that's old!)
  550. #    then we have to supply a different version of dirent.h which
  551. #    is compatible with the substitute version of opendir that's
  552. #    provided.  This version only works with V7-style directories.
  553. #--------------------------------------------------------------------
  554.  
  555. echo checking for opendir
  556. cat > conftest.c <<EOF
  557. #include <stdio.h>
  558. main() { exit(0); } 
  559. t() { 
  560. #ifdef __stub_opendir
  561. choke me
  562. #else
  563. /* Override any gcc2 internal prototype to avoid an error.  */
  564. extern char opendir(); opendir();
  565. #endif
  566.  }
  567. EOF
  568. if eval $compile; then
  569.   :
  570. else
  571.   DEFS="$DEFS -DUSE_DIRENT2_H=1"
  572. fi
  573. rm -f conftest*
  574. #endif
  575.  
  576.  
  577. #--------------------------------------------------------------------
  578. #    Check for the existence of sys_errlist (this is only needed if
  579. #    there's no strerror, but I don't know how to conditionalize the
  580. #    check).
  581. #--------------------------------------------------------------------
  582.  
  583. echo checking for sys_errlist
  584. cat > conftest.c <<EOF
  585.  
  586. main() { exit(0); } 
  587. t() { 
  588. extern char *sys_errlist[];
  589. extern int sys_nerr;
  590. sys_errlist[sys_nerr-1][0] = 0;
  591.  }
  592. EOF
  593. if eval $compile; then
  594.   :
  595. else
  596.   DEFS="$DEFS -DNO_SYS_ERRLIST=1"
  597. fi
  598. rm -f conftest*
  599.  
  600.  
  601. #--------------------------------------------------------------------
  602. #    The check below checks whether <sys/wait.h> defines the type
  603. #    "union wait" correctly.  It's needed because of weirdness in
  604. #    HP-UX where "union wait" is defined in both the BSD and SYS-V
  605. #    environments.  Checking the usability of WIFEXITED seems to do
  606. #    the trick.
  607. #--------------------------------------------------------------------
  608.  
  609. echo checking for union wait
  610. cat > conftest.c <<EOF
  611. #include <sys/types.h> 
  612. #include <sys/wait.h>
  613. main() { exit(0); } 
  614. t() { 
  615. union wait x;
  616. WIFEXITED(x);        /* Generates compiler error if WIFEXITED
  617.              * uses an int. */
  618.  }
  619. EOF
  620. if eval $compile; then
  621.   :
  622. else
  623.   DEFS="$DEFS -DNO_UNION_WAIT=1"
  624. fi
  625. rm -f conftest*
  626.  
  627.  
  628. #--------------------------------------------------------------------
  629. #    Check to see whether the system supports the matherr function
  630. #    and its associated type "struct exception".
  631. #--------------------------------------------------------------------
  632.  
  633. echo checking for matherr support
  634. cat > conftest.c <<EOF
  635. #include <math.h>
  636. main() { exit(0); } 
  637. t() { 
  638. struct exception x;
  639. x.type = DOMAIN;
  640. x.type = SING;
  641.  }
  642. EOF
  643. if eval $compile; then
  644.   LIBOBJS="$LIBOBJS tclMtherr.o"; DEFS="$DEFS -DNEED_MATHERR=1"
  645. fi
  646. rm -f conftest*
  647.  
  648.  
  649. if test -n "$prefix"; then
  650.   test -z "$exec_prefix" && exec_prefix='${prefix}'
  651.   prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  652. fi
  653. if test -n "$exec_prefix"; then
  654.   prsub="$prsub
  655. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%\
  656. exec_prefix\\1=\\2$exec_prefix%"
  657. fi
  658.  
  659. trap 'rm -f config.status; exit 1' 1 3 15
  660. echo creating config.status
  661. rm -f config.status
  662. cat > config.status <<EOF
  663. #!/bin/sh
  664. # Generated automatically by configure.
  665. # Run this file to recreate the current configuration.
  666. # This directory was configured as follows,
  667. # on host `(hostname || uname -n) 2>/dev/null`:
  668. #
  669. # $0 $*
  670.  
  671. for arg
  672. do
  673.   case "\$arg" in
  674.     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  675.     exec /bin/sh $0 $* ;;
  676.     *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  677.   esac
  678. done
  679.  
  680. trap 'rm -f Makefile; exit 1' 1 3 15
  681. INSTALL='$INSTALL'
  682. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  683. INSTALL_DATA='$INSTALL_DATA'
  684. RANLIB='$RANLIB'
  685. LIBOBJS='$LIBOBJS'
  686. CPP='$CPP'
  687. LIBS='$LIBS'
  688. srcdir='$srcdir'
  689. DEFS='$DEFS'
  690. prefix='$prefix'
  691. exec_prefix='$exec_prefix'
  692. prsub='$prsub'
  693. EOF
  694. cat >> config.status <<\EOF
  695.  
  696. top_srcdir=$srcdir
  697. for file in .. Makefile; do if [ "x$file" != "x.." ]; then
  698.   srcdir=$top_srcdir
  699.   # Remove last slash and all that follows it.  Not all systems have dirname.
  700.   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  701.   if test "$dir" != "$file"; then
  702.     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  703.     test ! -d $dir && mkdir $dir
  704.   fi
  705.   echo creating $file
  706.   rm -f $file
  707.   echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  708.   sed -e "
  709. $prsub
  710. s%@INSTALL@%$INSTALL%g
  711. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  712. s%@INSTALL_DATA@%$INSTALL_DATA%g
  713. s%@RANLIB@%$RANLIB%g
  714. s%@LIBOBJS@%$LIBOBJS%g
  715. s%@CPP@%$CPP%g
  716. s%@LIBS@%$LIBS%g
  717. s%@srcdir@%$srcdir%g
  718. s%@DEFS@%$DEFS%
  719. " $top_srcdir/${file}.in >> $file
  720. fi; done
  721.  
  722. EOF
  723. chmod +x config.status
  724. test -n "$no_create" || ./config.status
  725.  
  726.